import { createStore } from "vuex"
createStore({
  state: {
      person:{
          name:'张三',
          age:18
      }
  },
  getters: {
      getkey(state){
          return state.person
      }
  },
  mutations: {
      setkey(state,payload){
        state.person= {...state.person,...payload}
      },
      delall(state){
          state.person = {}
      }
  }
})
export default createStore

